<template>
  <div class="discussionGroup" @mouseleave="onMouseLeave">
    <div class="discussionGroup-content">
      <!-- 欢迎加入LightBox用户交流群 -->
      <div class="discussionGroup-title">{{ $t('discussionGroup.content') }}</div>
      <div class="flex justify-end">
        <!-- 立即进群 -->
        <el-button @click="openUrl" size="small" type="primary">{{ $t('discussionGroup.join') }}</el-button>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts">
import ipcMainApi from '@/ipcMainApi'

const onMouseLeave = () => {
  // ipcMainApi.aiAssistantApi.destroyDiscussionGroup()
}
const openUrl = () => {
  window.open('https://nops.woa.com/pigeon/v1/tools/add_chat?chatId=ww207189280135132')
  ipcMainApi.aiAssistantApi.destroyDiscussionGroup()
}

</script>

<style lang="scss" scoped>
.discussionGroup {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none; /* 不允许鼠标复制 */
}
.discussionGroup-content {
  max-width: 200px;
  border-radius: 6px;
  padding: 6px;
  background-color: #fff;
  box-shadow: 0px 0px 15px 0px rgba(0,0,0,0.3);
}
.discussionGroup-title {
  margin-bottom: 8px;
  font-size: 12px;
}
</style>
